#include <stdio.h>

typedef struct
{
    int *data;
    int length;
} SqList;

void swap(SqList &L, int i, int j)
{
    int temp = L.data[i];
    L.data[i] = L.data[j];
    L.data[j] = temp;
}

void printList(SqList L) {
    for (int i = 0; i < L.length; i++) {
        printf("%d ", L.data[i]);
    }
    printf("\n");
}